SELECT
<#switch (object__id!)>
	<#case "beginDate">
T.BEGIN_DATE AS beginDate
	<#break>
	<#case "code">
T.CODE AS code
	<#break>
	<#case "endDate">
T.END_DATE AS endDate
	<#break>
	<#case "entityId">
T.ENTITY_ID AS entityId
	<#break>
	<#case "id">
T.ID AS id
	<#break>
	<#case "name">
T.NAME AS name
	<#break>
	<#case "orderCode">
T.ORDER_CODE AS orderCode
	<#break>
	<#case "remark">
T.REMARK AS remark
	<#break>
	<#case "typeId">
T.TYPE_ID AS typeId
	<#break>
	<#case "typeId2">
T.TYPE_ID2 AS typeId2
	<#break>
	<#case "value">
T.VALUE AS value
	<#break>
	<#default>
COUNT(1) AS COUNT_
</#switch>
FROM C1_ENTITY_EXTEND T
<#include "whereByCode.ftl">